Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions That Modify Movie Properties / Working With Sound Volume


SetMovieVolume

The SetMovieVolume function allows your application to set a movie's current volume.

pascal void SetMovieVolume (Movie theMovie, short volume);
theMovie
Specifies the movie for this operation. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, and NewMovieFromHandle (described on page 2-80, page 2-76, and page 2-78, respectively).
volume
Specifies the current volume setting of the movie represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting.
kFullVolume
Sets the movie to full volume (constant value is 1.0).
kNoVolume
Sets the movie to no volume (constant value is 0.0).
ERROR CODES
invalidMovie-2010This movie is corrupted or invalid
SEE ALSO
Your application can obtain the current volume setting by calling the GetMovieVolume function, which is described in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996